<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CrmStudent extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('crm_student',function(Blueprint $table){
            $table->id();
            $table->string('student_no',20)->unique()->comment('学生编号（唯一)');
            $table->string('name',50)->comment('学生姓名');
            $table->tinyInteger('sex')->comment('年龄');
            $table->string('address')->nullable()->comment('地址');
            $table->string('mobile',20)->nullable()->comment('手机号');
            $table->integer('class_id')->nullable()->comment('班级ID');
            $table->tinyInteger('status')->default(1)->comment('状态：1=正常，0=禁用');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('crm_student');
    }
}
